package com.topideal.supplychain.hades.service;

import com.topideal.supplychain.hades.dto.ProjectViewDto;
import com.topideal.supplychain.hades.viewfilter.BasicInfoFilter;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;

/**
 * 项目工时统计
 *
 * @author xuxiaoyan
 * @date 2018-09-12 09:55
 */
public interface ProjectTimeCountService {

    /**
     * 按项目、模块维度统计工时
     *
     * @param basicInfoFilter
     * @return
     */
    List<ProjectViewDto> selectProjectTimeSummary(BasicInfoFilter basicInfoFilter);

    /**
     * 按项目维度查询项目下jira任务及工时详情  ps(会显示直接跟项目关联的jira任务)
     *
     * @param basicInfoFilter
     * @return
     */
    List<ProjectViewDto> selectProjectTimeDetail(BasicInfoFilter basicInfoFilter);

    /**
     * 批量查询自定义字段信息（开发人/测试人/预计开发时间/预计测试时间）
     *
     * @param issueIds
     * @param customfieldId
     * @return
     */
    List<ProjectViewDto> selectCustomfieldDetail(List<BigDecimal> issueIds, String customfieldId);


    /**
     * 批量查询时间节点信息（实际开发完成时间/实际测试完成时间/关闭时间(多个取最新)）
     *
     * @param issueIds
     * @param issueStatus
     * @return
     */
    List<ProjectViewDto> selectChangeGroupDetail(List<BigDecimal> issueIds, String issueStatus);

    /**
     * 查询任务的开发/测试登记工时
     *
     * @param issueId
     * @param author
     * @return
     */
    ProjectViewDto selectWorkLogDetail(BigDecimal issueId, String author);

    /**
     * 查找中文名
     *
     * @param engName
     * @return
     */
    String selectChinaName(String engName);

    /**
     * 按模块维度查询jira任务及工时详情
     *
     * @param filter
     */
    List<ProjectViewDto> selectComponentTimeDetail(BasicInfoFilter filter);

    /**
     * 导出项目模块工时统计列表
     *
     * @param basicInfoFilter
     * @param response
     */
    void exportProjectListExcel(BasicInfoFilter basicInfoFilter, HttpServletResponse response) throws IOException;

    /**
     * 项目工时详情导出
     *
     * @param filter
     * @param response
     */
    void exportProjectDetailExcel(BasicInfoFilter filter, HttpServletResponse response) throws IOException;


    /**
     * 模块工时详情导出
     *
     * @param filter
     * @param response
     */
    void exportComponentDetailExcel(BasicInfoFilter filter, HttpServletResponse response) throws IOException;

    /**
     * 项目详情导出条数check
     *
     * @param filter
     */
    void isExportProjectDetailExcel(BasicInfoFilter filter);
}
